Optimal. Leaf size=205 \[ \frac{\log \left (a+b x+c x^2\right ) \left (B \left (-c e (a e+2 b d)+b^2 e^2+c^2 d^2\right )+A c e (2 c d-b e)\right )}{2 c^3}+\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (b c \left (-3 a B e^2+2 A c d e+B c d^2\right )-2 c^2 \left (-a A e^2-2 a B d e+A c d^2\right )-b^2 c e (A e+2 B d)+b^3 B e^2\right )}{c^3 \sqrt{b^2-4 a c}}+\frac{e x (A c e-b B e+2 B c d)}{c^2}+\frac{B e^2 x^2}{2 c} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.764161, antiderivative size = 205, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ \frac{\log \left (a+b x+c x^2\right ) \left (B \left (-c e (a e+2 b d)+b^2 e^2+c^2 d^2\right )+A c e (2 c d-b e)\right )}{2 c^3}+\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (b c \left (-3 a B e^2+2 A c d e+B c d^2\right )-2 c^2 \left (-a A e^2-2 a B d e+A c d^2\right )-b^2 c e (A e+2 B d)+b^3 B e^2\right )}{c^3 \sqrt{b^2-4 a c}}+\frac{e x (A c e-b B e+2 B c d)}{c^2}+\frac{B e^2 x^2}{2 c} \]
Antiderivative was successfully verified.
[In] Int[((A + B*x)*(d + e*x)^2)/(a + b*x + c*x^2),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((B*x+A)*(e*x+d)**2/(c*x**2+b*x+a),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.34552, size = 203, normalized size = 0.99 \[ \frac{\log (a+x (b+c x)) \left (B \left (-c e (a e+2 b d)+b^2 e^2+c^2 d^2\right )+A c e (2 c d-b e)\right )-\frac{2 \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right ) \left (b c \left (-3 a B e^2+2 A c d e+B c d^2\right )+2 c^2 \left (a A e^2+2 a B d e-A c d^2\right )-b^2 c e (A e+2 B d)+b^3 B e^2\right )}{\sqrt{4 a c-b^2}}+2 c e x (A c e-b B e+2 B c d)+B c^2 e^2 x^2}{2 c^3} \]
Antiderivative was successfully verified.
[In] Integrate[((A + B*x)*(d + e*x)^2)/(a + b*x + c*x^2),x]
[Out]
_______________________________________________________________________________________
Maple [B] time = 0.007, size = 543, normalized size = 2.7 \[{\frac{B{e}^{2}{x}^{2}}{2\,c}}+{\frac{{e}^{2}Ax}{c}}-{\frac{B{e}^{2}bx}{{c}^{2}}}+2\,{\frac{Bedx}{c}}-{\frac{\ln \left ( c{x}^{2}+bx+a \right ) Ab{e}^{2}}{2\,{c}^{2}}}+{\frac{\ln \left ( c{x}^{2}+bx+a \right ) Ade}{c}}-{\frac{\ln \left ( c{x}^{2}+bx+a \right ) Ba{e}^{2}}{2\,{c}^{2}}}+{\frac{\ln \left ( c{x}^{2}+bx+a \right ) B{b}^{2}{e}^{2}}{2\,{c}^{3}}}-{\frac{\ln \left ( c{x}^{2}+bx+a \right ) Bbde}{{c}^{2}}}+{\frac{\ln \left ( c{x}^{2}+bx+a \right ) B{d}^{2}}{2\,c}}-2\,{\frac{Aa{e}^{2}}{c\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+2\,{\frac{A{d}^{2}}{\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+3\,{\frac{B{e}^{2}ab}{{c}^{2}\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-4\,{\frac{aBde}{c\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{A{b}^{2}{e}^{2}}{{c}^{2}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-2\,{\frac{Abde}{c\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-{\frac{{b}^{3}B{e}^{2}}{{c}^{3}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}+2\,{\frac{{b}^{2}Bde}{{c}^{2}\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-{\frac{bB{d}^{2}}{c}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((B*x+A)*(e*x+d)^2/(c*x^2+b*x+a),x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((B*x + A)*(e*x + d)^2/(c*x^2 + b*x + a),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.302013, size = 1, normalized size = 0. \[ \left [\frac{{\left ({\left (B b c^{2} - 2 \, A c^{3}\right )} d^{2} - 2 \,{\left (B b^{2} c -{\left (2 \, B a + A b\right )} c^{2}\right )} d e +{\left (B b^{3} + 2 \, A a c^{2} -{\left (3 \, B a b + A b^{2}\right )} c\right )} e^{2}\right )} \log \left (\frac{b^{3} - 4 \, a b c + 2 \,{\left (b^{2} c - 4 \, a c^{2}\right )} x +{\left (2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{2} + b x + a}\right ) +{\left (B c^{2} e^{2} x^{2} + 2 \,{\left (2 \, B c^{2} d e -{\left (B b c - A c^{2}\right )} e^{2}\right )} x +{\left (B c^{2} d^{2} - 2 \,{\left (B b c - A c^{2}\right )} d e +{\left (B b^{2} -{\left (B a + A b\right )} c\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )\right )} \sqrt{b^{2} - 4 \, a c}}{2 \, \sqrt{b^{2} - 4 \, a c} c^{3}}, -\frac{2 \,{\left ({\left (B b c^{2} - 2 \, A c^{3}\right )} d^{2} - 2 \,{\left (B b^{2} c -{\left (2 \, B a + A b\right )} c^{2}\right )} d e +{\left (B b^{3} + 2 \, A a c^{2} -{\left (3 \, B a b + A b^{2}\right )} c\right )} e^{2}\right )} \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) -{\left (B c^{2} e^{2} x^{2} + 2 \,{\left (2 \, B c^{2} d e -{\left (B b c - A c^{2}\right )} e^{2}\right )} x +{\left (B c^{2} d^{2} - 2 \,{\left (B b c - A c^{2}\right )} d e +{\left (B b^{2} -{\left (B a + A b\right )} c\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )\right )} \sqrt{-b^{2} + 4 \, a c}}{2 \, \sqrt{-b^{2} + 4 \, a c} c^{3}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((B*x + A)*(e*x + d)^2/(c*x^2 + b*x + a),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 32.0635, size = 1532, normalized size = 7.47 \[ \text{result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((B*x+A)*(e*x+d)**2/(c*x**2+b*x+a),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.334128, size = 296, normalized size = 1.44 \[ \frac{B c x^{2} e^{2} + 4 \, B c d x e - 2 \, B b x e^{2} + 2 \, A c x e^{2}}{2 \, c^{2}} + \frac{{\left (B c^{2} d^{2} - 2 \, B b c d e + 2 \, A c^{2} d e + B b^{2} e^{2} - B a c e^{2} - A b c e^{2}\right )}{\rm ln}\left (c x^{2} + b x + a\right )}{2 \, c^{3}} - \frac{{\left (B b c^{2} d^{2} - 2 \, A c^{3} d^{2} - 2 \, B b^{2} c d e + 4 \, B a c^{2} d e + 2 \, A b c^{2} d e + B b^{3} e^{2} - 3 \, B a b c e^{2} - A b^{2} c e^{2} + 2 \, A a c^{2} e^{2}\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} c^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((B*x + A)*(e*x + d)^2/(c*x^2 + b*x + a),x, algorithm="giac")
[Out]